package com.xkp.news.service;

import com.xkp.news.dao.UserDao;
import com.xkp.news.dao.UserDaoImpl;
import com.xkp.news.entity.User;

public class UserServiceImpl implements UserService {

    //依赖属性   userDao

    private UserDao userDao=new UserDaoImpl();

    @Override
    public User login(String acct) {
        return userDao.getUserByAcct(acct);
    }

    @Override
    public boolean reg(User user) {
        return userDao.saveUser(user);
    }
}
